class BlindboxProductsDetailVo {
  BlindboxProductsData? data;
  BlindboxProductsMeta? meta;

  BlindboxProductsDetailVo({this.data, this.meta});

  BlindboxProductsDetailVo.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null ? new BlindboxProductsData.fromJson(json['data']) : null;
    meta = json['meta'] != null ? new BlindboxProductsMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class BlindboxProductsData {
  int? id;
  String? title;
  String? price;
  String? thumbnail;
  List<String>? images;
  int? status;
  String? rewardRules;
  String? description;
  int? quantity;
  int? sales;
  String? startTime;
  String? endTime;
  String? lotteryTime;
  int? remainingTime;
  int? integral;
  int? isPurchase;
  int? isRenewal;
  String? orderSn;
  String? subtitle;
  String? tips;
  String? statusStr;

  BlindboxProductsData(
      {this.id,
      this.title,
      this.price,
      this.thumbnail,
      this.images,
      this.status,
      this.rewardRules,
      this.description,
      this.quantity,
      this.sales,
      this.startTime,
      this.endTime,
      this.remainingTime,
      this.integral,
      this.isPurchase,
      this.lotteryTime,
      this.subtitle,
      this.tips,
      this.statusStr,
      this.isRenewal,
      this.orderSn});

  BlindboxProductsData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    title = json['title'];
    price = json['price'];
    thumbnail = json['thumbnail'];
    images = json['images'].cast<String>();
    status = json['status'];
    rewardRules = json['reward_rules'];
    description = json['description'];
    quantity = json['quantity'];
    sales = json['sales'];
    startTime = json['start_time'];
    endTime = json['end_time'];
    remainingTime = json['remaining_time'];
    integral = json['integral'];
    isPurchase = json['is_purchase'];
    lotteryTime = json['lottery_time'];
    subtitle = json['subtitle'];
    tips = json['tips'];
    statusStr = json['status_str'];
    isRenewal = json['is_renewal'];
    orderSn = json['order_sn'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['title'] = this.title;
    data['price'] = this.price;
    data['thumbnail'] = this.thumbnail;
    data['images'] = this.images;
    data['status'] = this.status;
    data['reward_rules'] = this.rewardRules;
    data['description'] = this.description;
    data['quantity'] = this.quantity;
    data['sales'] = this.sales;
    data['start_time'] = this.startTime;
    data['end_time'] = this.endTime;
    data['remaining_time'] = this.remainingTime;
    data['integral'] = this.integral;
    data['is_purchase'] = this.isPurchase;
    data['lottery_time'] = this.lotteryTime;
    data['subtitle'] = this.subtitle;
    data['tips'] = this.tips;
    data['status_str'] = this.statusStr;
    data['is_renewal'] = this.isRenewal;
    data['order_sn'] = this.orderSn;
    return data;
  }
}

class BlindboxProductsMeta {
  List<Status>? status;

  BlindboxProductsMeta({this.status});

  BlindboxProductsMeta.fromJson(Map<String, dynamic> json) {
    if (json['status'] != null) {
      status = <Status>[];
      json['status'].forEach((v) {
        status!.add(new Status.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.status != null) {
      data['status'] = this.status!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Status {
  int? key;
  String? value;

  Status({this.key, this.value});

  Status.fromJson(Map<String, dynamic> json) {
    key = json['key'];
    value = json['value'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['key'] = this.key;
    data['value'] = this.value;
    return data;
  }
}
